{% load staticfiles %}
{% load blog_tags %}

<!DOCTYPE html>
<html>
<head>
    <title>快活の小道士</title>

    <!-- meta -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- css -->
    <link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link rel="stylesheet" href="{% static 'blog/css/bootstrap.min.css' %}">
    {#    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">#}
    <link rel="stylesheet" href="{% static 'blog/css/pace.css' %}">
    <link rel="stylesheet" href="{% static 'blog/css/custom.css' %}">
    <link rel="stylesheet" href="{% static 'blog/css/highlights/github.css' %}">

    <!-- js -->
    {#    <script src="https://cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script>#}
    {#    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>#}
    <script src="{% static 'blog/js/jquery-2.1.3.min.js' %}"></script>
    <script src="{% static 'blog/js/bootstrap.min.js' %}"></script>
    <script src="{% static 'blog/js/pace.min.js' %}"></script>
    <script src="{% static 'blog/js/modernizr.custom.js' %}"></script>

    <style>
        span.highlighted {
            color: red;
        }
    </style>


</head>

<body>
<div class="container">
    <header id="site-header">
        <div class="row">
            <div class="col-md-4 col-sm-5 col-xs-8">
                <div class="logo">
                    <h3><a href="{% url 'myblog:index' %}">快活の小道士</a></h3>
                </div>
            </div><!-- col-md-4 -->
            <div class="col-md-8 col-sm-7 col-xs-4">
                <nav class="main-nav" role="navigation">
                    <div class="navbar-header">
                        <button type="button" id="trigger-overlay" class="navbar-toggle">
                            <span class="ion-navicon"></span>
                        </button>
                    </div>

                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav navbar-right">
                            <li class="cl-effect-11"><a href="{% url 'myblog:index' %}" data-hover="首页">首页</a></li>
                            <li class="cl-effect-11"><a href="#" data-hover="博客">博客</a></li>
                            <li class="cl-effect-11"><a href="{% url 'myblog:about' %}" data-hover="关于">关于</a></li>
                            <li class="cl-effect-11"><a href="#" data-hover="联系">联系</a></li>
                        </ul>

                    </div><!-- /.navbar-collapse -->
                </nav>
                <div id="header-search-box">
                    <a id="search-menu" href="javascript:void(0)"><span id="search-icon"
                                                                        class="ion-ios-search-strong"></span></a>
                    <div id="search-form" class="search-form">
                        <form role="search" method="get" id="searchform" action="{% url 'haystack_search' %}">
                            <input type="search" name="q" placeholder="搜索" required>
                            <button type="submit"><span class="ion-ios-search-strong"></span></button>
                        </form>
                    </div>
                </div>
            </div><!-- col-md-8 -->
        </div>
    </header>
</div>

<div class="content-body">
    <div class="container">
        <div class="row">
            <main class="col-md-8">
                {% block main %}
                {% endblock main %}
            </main>
            <aside class="col-md-4">
                {% block toc %}
                    <div class="widget widget-recent-posts">
                        <h4 class="widget-title">最新文章</h4>
                        {% get_recent_articles as article_list %}
                        <ul>
                            {% for article in article_list %}
                                <li>
                                    <a href="{{ article.get_absolute_url }}">{{ article.title }}</a>
                                </li>
                            {% empty %}
                                暂无文章
                            {% endfor %}
                        </ul>
                    </div>
                    <div class="widget widget-archives">
                        <h4 class="widget-title">归档</h4>
                        {% get_archives as archive_list %}
                        <ul>
                            {% for archive in archive_list %}
                                <li>
                                    <a href="{% url 'myblog:archives' archive.year archive.month %}">{{ archive.year }}
                                        年 {{ archive.month }} 月</a>
                                </li>
                            {% empty %}
                                暂无归档
                            {% endfor %}
                        </ul>
                    </div>

                    <div class="widget widget-category">
                        <h4 class="widget-title">分类</h4>
                        {% get_categories as category_list %}
                        <ul>
                            {% for category in category_list %}
                                <li>
                                    <a href="{% url 'myblog:category' category.id %}">{{ category.name }}<span
                                            class="post-count">({{ category.article_count }})</span></a>
                                </li>
                            {% empty %}
                                暂无分类
                            {% endfor %}
                        </ul>
                    </div>

                    <div class="widget widget-tag-cloud">
                        <h4 class="widget-title">标签云</h4>
                        {% get_tags as tag_list %}
                        <ul>
                            {% for tag in tag_list %}
                                <li>
                                    <a href="{% url 'myblog:tag' tag.pk %}">{{ tag.name }}<span
                                            class="post-count">({{ tag.article_count }})</span></a>
                                </li>
                            {% empty %}
                                暂无标签
                            {% endfor %}

                        </ul>
                    </div>

                    <div class="rss">
                        <a href="{% url 'rss' %}" title="RSS订阅"><span class="ion-social-rss-outline"></span></a>
                        <a href="https://github.com/zlcoming" title="Github"><span
                                class="ion-social-github-outline"></span></a>
                    </div>

                {% endblock toc %}
            </aside>
        </div>
    </div>
</div>
<footer id="site-footer">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <p class="copyright">&copy2017 快活の小道士的博客
                    <a class="copyright" href="http://www.miitbeian.gov.cn/">粤ICP备17126034号</a>
                </p>
            </div>
        </div>
    </div>
</footer>

<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
    <button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
    <nav>
        <ul>
            <li><a href="{% url 'myblog:index' %}">首页</a></li>
            <li><a href="#">博客</a></li>
            <li><a href="{% url 'myblog:about' %}">关于</a></li>
            <li><a href="#">联系</a></li>
        </ul>
    </nav>
</div>

<script src="{% static 'blog/js/script.js' %}"></script>

</body>
</html>
